{% extends "staff/base.html" %}
{% import 'staff/_formhelpers.html' as forms with context %}
{% import '_globalhelpers.html' as globals %}

{% block title %} Edit {{ backup.assignment.display_name }} {{ "Submission" if backup.is_submit else "Backup" }} - {{ backup.assignment.course.display_name_with_semester }}{% endblock %}

{% block main %}
  <section class="content-header">
      <h1>
        Edit {{ "submission" if backup.is_submit else "backup" }} for {{ student.identifier }}
      </h1>
      <ol class="breadcrumb">
          <li><a href="{{ url_for(".course", cid=backup.assignment.course.id) }}">
              <i class="fa fa-university"></i> {{ backup.assignment.course.offering }}
          </a></li>
          <li><a href="{{ url_for('.course_assignments', cid=backup.assignment.course.id) }}">
            <i class="fa fa-list"></i> Assignments</a>
          </li>
          <li><a href="{{ url_for('.assignment', cid=backup.assignment.course.id, aid=backup.assignment.id) }}"><i class="fa fa-book"></i> {{ backup.assignment.display_name }}</a></li>
          <li><a href="{{ url_for('.grading', bid=backup.id) }}"><i class="fa fa-book"></i> Grade {{ globals.backup_style(utils.encode_id(backup.id)) }}</a></li>
          <li class="active"><a href="#"><i class="fa fa-book"></i> Edit {{ globals.backup_style(utils.encode_id(backup.id)) }}</a></li>
      </ol>
  </section>

  <section class="content">

    {% include 'alerts.html' %}
    <div class="row">
      <div class="col-md-12">
        <!-- Default box -->
        <div class="box">
          <div class="box-body">
          {% call forms.render_form(form) %}
            <label class="control-label">Submission time: </label>
            {{ forms.render_radio_field(form.submission_time) }}
            {{ forms.render_field(
              form.custom_submission_time,
              placeholder='YYYY-MM-DD hh:mm:ss',
              label_visible=false) }}
          {% endcall %}

          </div>
          <!-- /.box-body -->
        </div>
        <!-- /.box -->
      </div>
    </div>
  </section>
{% endblock %}
